package com.light.sys.controller;

import com.light.common.base.PageResult;
import com.light.common.base.ResponseResult;
import com.light.common.base.BaseController;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.light.sys.domain.SysRoleDO;
import com.light.sys.service.SysRoleService;
import com.light.sys.query.SysRoleQuery;


/**
 * 
 * @Description: 角色名称
 * @author yhr
 * @Version V1.0
 * @date 
 */

@RestController
@RequestMapping("/sys/sysRole")
@Api(tags  =  "角色管理",  description  =  "")
public class SysRoleController extends BaseController<SysRoleDO, SysRoleService>{
	@Autowired
	private SysRoleService sysRoleService;
	
    @ApiOperation(value="获取列表信息")
    @GetMapping("")
	public ResponseResult<PageResult<SysRoleDO>> data(SysRoleQuery sysRoleQuery){
		//查询列表数据
        PageResult pageResult=new PageResult(sysRoleService.data(sysRoleQuery)
                ,sysRoleService.count(sysRoleQuery),sysRoleQuery);
        return ResponseResult.success(pageResult);
	}
}
